Refactoring Idiomatic Exception Handling in C++: Throwing and Catching Exceptions with Aspects

نویسندگان

  • Michael Mortensen
  • Sudipto Ghosh
چکیده

Aspect-oriented programming can be used to modularize crosscutting concerns to improve the maintainability of large systems. Exceptions cross-cut legacy applications and are often implemented in idioms which cannot be globally enforced. We describe an aspect-oriented approach for throwing exceptions in place of the “return code idiom”, and discuss using aspects to handle those exceptions in a modular way. We also describe challenges we encountered in implementing some exception-handling control flow strategies.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Students' Understanding of Advanced Properties of Java Exceptions

This study examines how Information Systems Engineering School students on the verge of their graduation understand the mechanism of exception handling. The main contributions of this paper are as follows: we construct a questionnaire aimed at examining students' level of understanding concerning exceptions; we classify and analyse the students' responses to the questionnaire in order to determ...

متن کامل

Using C++ exceptions in the Linux kernel

Driven by the desire to facilitate more maintainable and robust systems, modern programming languages offer explicit constructs to facilitate the handling of exceptional events. The use of exceptions is common in user space programming, and is an integral part of common programming styles and best practices. In spite of this exceptions are rarely used in kernel-space. In fact, some operating sy...

متن کامل

A Quantitative Study on the Aspectization of Exception Handling

It is usually assumed that the implementation of exception handling can be better modularized by the use of aspect-oriented programming (AOP). However, the trade-offs involved in using AOP with this goal are not yet wellunderstood. To the best of our knowledge, no work in the literature has attempted to assess whether AOP really promotes an enhancement in well-understood quality attributes othe...

متن کامل

Java Idioms - Exception Handling

Exceptions are a powerful feature for the propagation and handling of failure of operations. Naive use of exceptions however introduces subtle complexity into a system due to the nonlocal nature of throwing an exception. This paper presents a pattern language of eleven Java idioms which serve as a framework for using exceptions. The patterns help to balance the forces that the overall complexit...

متن کامل

Handler Cloning for Optimizing Exception Handling

Handler cloning is a technique for optimizing exception handling. For a specific exception handler catching and rethrowing multiple classes of exceptions, it creates a clone of the original handler and registers the clone as a handler that catches only a single class or subset of the classes for the original handler. The rethrown exceptions from the clone are determined at the compile time.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007